home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1986 January
/
1986-01.d64
/
sprint demo
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
698b
|
22 lines
100 poke53280,0:poke53281,2:print"[147]"tab(15)"64 doodler"
110 print"[144]"tab(8)"plug joystick into port 2"
120 print""tab(9)"use it to draw pictures"
130 print""tab(10)"trigger clears screen":print""tab(14)"press any key"
140 geta$:ifa$=""then140
150 print"[147]":fori=0to7:readp(i):next:data1,2,4,8,16,32,64,128
160 fori=0to10:readdx(i),dy(i):next
170 data0,0,0,-1,0,1,0,0,-1,0,-1,-1,-1,1,0,0,1,0,1,-1,1,1
180 poke53272,peek(53272)or8:poke53265,peek(53265)or32
190 gosub300:fori=1024to2023:pokei,2:next
200 x=160:y=100
210 gosub280:j=peek(56320):k=jand16:ifk=0thengosub300
220 j=jand15:j=15-j:x=x+dx(j):y=y+dy(j)
230 ifx>319thenx=0
240 ifx<0thenx=319
250 ify>199theny=0
260 ify<0theny=199
270 goto210
280 ro%=y/8:ch%=x/8:li=yand7:bi=xand7:bi=7-bi:b1=ro%*320:b2=ch%*8
290 by=8192+b1+b2+li:pokeby,peek(by)orp(bi):return
300 fori=8192to16383:pokei,0:next:return